package org.testis.testdriver;

/**
 *
 * @author barisergun
 */


import org.testis.utils.UuidGenerator;

public class ExecutionGuidProvider {
    
    private static ExecutionGuidProvider m_guidprovider;
    private String m_executionId;
    
     private ExecutionGuidProvider()
    {
    }

    
        /**
     * A static method for creating singleton instance of ExecutionGuidProvider
     * @return
     */
    public static ExecutionGuidProvider createInstance()
        
    {
        if (m_guidprovider == null) {
            m_guidprovider = new ExecutionGuidProvider();            
        }

        return m_guidprovider;
    }


    public static ExecutionGuidProvider getInstance()
    {
        return m_guidprovider;
    }
    
    public void generateNewExecId()
    {
        m_executionId = UuidGenerator.generateMsgId();
    }
    public String getExistingExecId()
    {
        return m_executionId;
    }


}
